clearset more offset mem 40m#delimit ;log using "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/table_2", replace text;use "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/data_IO";generate r_sp=log(1/16+(255/256)*sprating);/* MODEL 1a */;heckman r_moodys chga_demo currentacctlag gdpcapgrowthlag res_gdplag inflatwdi1 l_trade_gdp resourcelag default, select (rated_2= chga_demo currentacctlag gdpcapgrowthlag res_gdplag inflatwdi1 l_trade_gdp resourcelag default flow1 d1960-d2000) vce(robust) cluster(ccode) mills(lambda);drop lambda;/* MODEL 1b */;heckman r_sp chga_demo currentacctlag gdpcapgrowthlag res_gdplag inflatwdi1 l_trade_gdp resourcelag default, select (rated_2= chga_demo currentacctlag gdpcapgrowthlag res_gdplag inflatwdi1 l_trade_gdp resourcelag default flow1 d1960-d2000) vce(robust) cluster(ccode) mills(lambda);drop lambda;/* MODEL 2a */;gen gdp_cap=gdplag/population;generate ln_gdp_cap=log(gdp_cap+1);heckman r_moodys chga_demo currentacctlag gdpcapgrowthlag ln_gdp_capinflatwdi1 l_trade_gdp resourcelag default if gdp_cap<12275,select (rated_2= chga_demo currentacctlag gdpcapgrowthlag ln_gdp_capinflatwdi1 l_trade_gdp resourcelag default flow1 d1970-d2000) vce(robust) cluster(ccode) mills(lambda);drop lambda; /* MODEL 2b */;heckman r_sp chga_demo currentacctlag gdpcapgrowthlag ln_gdp_capinflatwdi1 l_trade_gdp resourcelag default if gdp_cap<12275,select (rated_2= chga_demo currentacctlag gdpcapgrowthlag ln_gdp_capinflatwdi1 l_trade_gdp resourcelag default flow1 d1970-d2000) vce(robust) cluster(ccode) mills(lambda);log c; 